Skip to content

Extract shared EPP template partials to reduce duplication#36

Merged
zehweh merged 1 commit into
masterfrom
refactor/epp-template-partials
Mar 23, 2026
Merged

Extract shared EPP template partials to reduce duplication#36
zehweh merged 1 commit into
masterfrom
refactor/epp-template-partials

Conversation

@zehweh
Copy link
Copy Markdown
Owner

@zehweh zehweh commented Mar 23, 2026

Summary

  • Create _common_properties.epp partial for the ~210-line common properties block shared by all 8 device types (ethernets, vlans, bridges, bonds, tunnels, wifis, modems, dummy_devices)
  • Create _physical_properties.epp partial for the ~95-line physical device block shared by 3 types (ethernets, wifis, modems)
  • Replace duplicated inline rendering in each device template with epp() calls to the partials

Create _common_properties.epp and _physical_properties.epp partials
that are included via epp() calls from each device template. This
eliminates ~1,700 lines of duplicated rendering logic across 8
templates while preserving identical output.

- _common_properties.epp: shared by all 8 device types (ethernets,
  vlans, bridges, bonds, tunnels, wifis, modems, dummy_devices)
- _physical_properties.epp: shared by 3 physical device types
  (ethernets, wifis, modems)
@zehweh zehweh merged commit 4f39a0f into master Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant